﻿using FluentNHibernate.Mapping;
using EfficientlyLazy.PhotoFramer.Entity;

namespace EfficientlyLazy.PhotoFramer.Mapping
{
    public sealed class PhotoMap : ClassMap<Photo>
    {
        public PhotoMap()
        {
            Table("Photos");
            Not.LazyLoad();

            Id(x => x.ID).GeneratedBy.GuidComb();
            Version(x => x.Version);

            Map(x => x.DateAdded);
            Map(x => x.Filename);
            Map(x => x.IncludeOnFrame);
            Map(x => x.RelativeLocation);
            Map(x => x.Height);
            Map(x => x.Width);
            Map(x => x.HorizontalResolution);
            Map(x => x.VerticalResolution);
            Map(x => x.PixelFormat);
            Map(x => x.RawFormat);
        }
    }
}
